package com.mjl.shops.adapter;

import android.content.Context;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mjl.shops.R;
import com.mjl.shops.bean.HomeTuiJian;
import com.mjl.shops.utils.ImgUtils;

import java.util.List;

public class HomeTuiJianAdapter extends BaseQuickAdapter<HomeTuiJian, BaseViewHolder> {

    private Context contexts;

    public HomeTuiJianAdapter(Context context,int layoutResId, @Nullable List<HomeTuiJian> data) {
        super(layoutResId, data);
        this.contexts = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeTuiJian item) {
        ImgUtils.ImageShow(contexts,item.getUrl(),helper.getView(R.id.tuijian_image));
    }
}
